<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    outSide:
    for (var i = 0; i < 3; i++) {
      console.log('我是外层的第' + i + '次');
      for (var j = 0; j < 3; j++) {
        if (j == 2) {
          break outSide;
        }
        console.log(' ' + ' ' + '我是内层的第' + j + '次');
      }
    }
  </script>
</body>
</html>